import xadmin

from xadmin import views

from .models import VerifyCode


class BaseSetting(object):
    enable_themes = True
    use_bootswatch = True


class GlobalSettings(object):
    site_title = "Outback管理后台"
    site_footer = "Outback"
    menu_style = "accordion"


class VerifyCodeAdmin(object):
    list_display = ['code', 'mobile', 'add_time']
    list_filter = ['code', 'mobile', 'add_time']
    search_fields = ['mobile']
    # model_icon='fa '


xadmin.site.register(VerifyCode, VerifyCodeAdmin)
xadmin.site.register(views.BaseAdminView, BaseSetting)
xadmin.site.register(views.CommAdminView, GlobalSettings)
